//
// Project: Disagreement in science: Missing women



clear all
version 15.1  



//
// set locals

// method of identifying female variable
local female "female_genderize"

// gender of author is known
local known_gender "female_genderize!=."





// call data
use "${data}/output/biorxiv_gender.dta", clear

// group years 2015 and earlier
replace year=2015 if year<2015

// analysis

// all authors on paper
regress `female' i.results_type_id##i.year if `known_gender'
margins year#results_type_id
marginsplot, legend(col(1) ring(0) bplacement(4) region(style(none)) symxsize(*0.6) size(medsmall) order(3 1 2) label(1 "confirmatory") label(2 "contradictory") label(3 "new")) plotregion(style(none)) scheme(s1color) title("") xtitle("Year") ytitle("Share of female authors") noci xlabel(2015 `"2013-2015"' 2016 2017 2018 2019, noticks labsize(medsmall)) ylabel(0 0.05 `"0.05"' .10 `"0.10"' .15 `"0.15"' .20 `"0.20"' .25 `"0.25"' .30 `"0.30"' .35 `"0.35"' .40 `"0.40"', grid angle(horizontal) labsize(medsmall)) yscale(r(., .4)) plotopts(lwidth(thick)) plot1opts(color(gs3%80) msymbol(O) msize(medium) lpattern(dash)) plot2opts(color(gs9%80) msymbol(S) msize(medium)) plot3opts(color(gs3%80) msymbol(O) msize(medium))
graph export "${output}/trend_biorxiv.eps", replace
graph export "${output}/trend_biorxiv.png", replace

// first author on paper
regress `female' i.results_type_id##i.year if `known_gender' & author_id==1
margins year#results_type_id
marginsplot, legend(col(1) ring(0) bplacement(4) region(style(none)) symxsize(*0.6) size(medsmall) order(3 1 2) label(1 "confirmatory") label(2 "contradictory") label(3 "new")) plotregion(style(none)) scheme(s1color) title("") xtitle("Year") ytitle("Share of female authors") noci xlabel(2015 `"2013-2015"' 2016 2017 2018 2019, noticks labsize(medsmall)) ylabel(0 0.05 `"0.05"' .10 `"0.10"' .15 `"0.15"' .20 `"0.20"' .25 `"0.25"' .30 `"0.30"' .35 `"0.35"' .40 `"0.40"', grid angle(horizontal) labsize(medsmall)) yscale(r(., .4)) plotopts(lwidth(thick)) plot1opts(color(gs3%80) msymbol(O) msize(medium) lpattern(dash)) plot2opts(color(gs9%80) msymbol(S) msize(medium)) plot3opts(color(gs3%80) msymbol(O) msize(medium))
graph export "${output}/trend_first_author_biorxiv.eps", replace
graph export "${output}/trend_first_author_biorxiv.png", replace


